package com.prs.crm.dao.sys;

import java.util.Collection;
import java.util.List;

import com.prs.crm.dao.BaseDao;
import com.prs.crm.domain.hr.Person;
import com.prs.crm.domain.sys.Menu;

public interface MenuDao extends BaseDao<Menu>{

	Menu findFirstBeforeMenu(Menu parentMenu,Integer sequence);
	
	Menu findFirstAfterMenu(Menu parentMenu,Integer sequence);
	
	Menu findBySequence(Menu parentMenu,Integer sequence);
	
	Integer getMaxSequence(Menu parent);
	
	List<Menu> getRootMenus();
	List<Menu> getAllMenu();
	
	Collection<Menu> findMenus(Menu parent,Person person);
	
	Collection<Menu> getChildMenu(Menu menu);
	
	Collection<Menu> getShortCutMenus();
	
	/**
	 * 批量删除
	 * 
	 * JohnLan
	 */
	boolean bachDelMenu(Integer[] ids);
	
	/**
	 * 查询菜单数据
	 * @param sql
	 * @param conditions
	 * @return
	 */
	List getCurrentOb(String sql);
	/**
	 * 删除
	 * @param hql
	 * @return
	 */
	Integer delData(String hql);
}
